package EveryDayPractice;

import java.util.Scanner;

public class Practice24 {
      public static void main(String[] args) {
          Scanner sc = new Scanner(System.in);
          int n = sc.nextInt();
         if(n/10000!=0)
         {
             System.out.print("他是五位数");
             int n1 = n%10000%1000%100%10;
             int n2 = n%10000%1000%100/10;
             int n3 = n%10000%1000/100;
             int n4 = n%10000/1000;
             int n5 = n/10000;
             System.out.print("逆序是"+n1+n2+n3+n4+n5);
         } else if (n/10000==0&&n/1000!=0) {
                    System.out.print("他是四位数");
             int n1 = n%1000%100%10;
             int n2 = n%1000%100/10;
             int n3 = n%1000/100;
             int n4 = n/1000;
             System.out.print("逆序是"+n1+n2+n3+n4);
         }
         else if (n/1000==0&&n/100!=0) {
             System.out.print("他是三位数");
             int n1 = n%100%10;
             int n2 = n%100/10;
             int n3 = n/100;
             System.out.print("逆序是"+n1+n2+n3);
         }
         else if (n/100==0&&n/10!=0) {
             System.out.print("他是两位数");
             int n1 = n%10;
             int n2 = n/10;
             System.out.print("逆序是"+n1+n2);
         }
         else{
             System.out.println("一位数"+n);
         }
      }
}
